#include <51func.h>
int main(int argc, char *argv[])
{
    int sv[2];
    socketpair(AF_UNIX,SOCK_STREAM,0,sv); // socket+pipe
    if(fork() == 0){
        close(sv[0]);
        send(sv[1],"howareyou",9,0);
    }
    else {
        close(sv[1]);
        char buf[1024] = {0};
        recv(sv[0],buf,sizeof(buf),0);
        printf("I am parent, buf = %s\n", buf);
        wait(NULL);
    }
    return 0;
}

